import Overlay from "ol/Overlay";
/**
 *
 * @param {*} el dom元素
 * @param {*} pos [经度,纬度]
 */
export function addPop(map, el, pos) {
  const overlay = new Overlay({
    element: el,
    position: pos,
    positioning: "bottom-center",
    offset: [4, 4],
    autoPan: {
      animation: {
        duration: 250,
      },
    },
  });
  map.addOverlay(overlay);
  overlay.setPosition(pos);
  return overlay;
}
